package com.vanke.kotlin_mvp

import com.vanke.kotlin_mvp.data.Task
import com.vanke.kotlin_mvp.main.TasksFilterType

/**
 * @name Kotlin_MVP
 * @package name：com.vanke.kotlin_mvp
 * @class describe
 * @anthor shiyuchuan
 * @time 2017/8/16 11:11
 */
interface MainContract {

    interface Presenter : BasePresenter {
        fun result(requestCode: Int, resultCode: Int)

        fun loadTasks(forceUpdate: Boolean)

        fun addNewTask()

        fun OpenTaskDetails(requestTask: Task)

        fun completeTask(completedTask: Task)

        fun activateTask(activeTask: Task)

        fun clearCompletedTasks()

        var currentFiltering: TasksFilterType
    }

    interface View : BaseView<Presenter> {

        fun setLoadingIndicator(active: Boolean)

        fun showTasks(tasks: List<Task>)

        fun showAddTask()

        fun showTaskDetailsUi(taskId: String)

        fun showTaskMarkedComplete()

        fun showTaskMarkedActive()

        fun showCompletedTasksCleared()

        fun showLoadingTasksError()

        fun showNoTasks()

        fun showActiveFilterLable()

        fun showCompletedFilterLabel()

        fun showAllFilterLable()

        fun showNoActiveTasks()

        fun showNoCompletedTasks()

        fun showSuccessfullySavedMessage()

        var isActive: Boolean

        fun showFilteringPopUpMenu()

    }
}
